VCS Support (pip)
URL prefixes
Gitはgit+
Git
The supported schemes are git+file, git+https, git+ssh, git+http, git+git and git.
MyProject @ git+ssh://git@git.example.com/MyProject
IMO:先頭のMyProjectはプロジェクト名らしい(URL fragmentsのegg)
MyProject @ git+https://git.example.com/MyProject
@で「branch name, a commit hash or a tag name」を指定できる
MyProject @ git+https://git.example.com/MyProject.git@master
IMO:プライベートリポジトリからのインストール
git+ssh://git@github.com/GitHubUser/MyProject.git
~/.ssh/configにUser git, Hostname github.comの設定がしてある
URL fragments
pip looks at the subdirectory fragments of VCS URLs for specifying the path to the Python package, when it is not in the root of the VCS directory. eg: pkg_dir.
「パッケージがVCSのルートにない場合はURLにsubdirectoryを指定する」
pip also looks at the egg fragment specifying the “project name”.
「egg fragmentでプロジェクト名を指定する」
In practice the egg fragment is only required to help pip determine the VCS clone location in editable mode.
editableでなければeggは使わない方がよいとのこと
以下は同じ
python -m pip install "pkg @ vcs+protocol://repo_url/#subdirectory=pkg_dir"
python -m pip install -e "vcs+protocol://repo_url/#egg=pkg&subdirectory=pkg_dir"
eggはeditableと一緒に使う。editableでないときはeggの指定は不要
#の後にパラメタを続ける!(?の後に続けてエラーになりハマった)